Unavailable Twitter names that are not taken?


I am writing a program that analyzes twitter handles for their availability. Can someone explain why I get a 404 HTTP status for certain handles, leading me to believe that these handles are not taken, but then when I go to register that particular handle, it says that the name is already taken (even though there is clearly no user profile for the handle)?