Small bugs

Hello, i was excited to find you have done some clean up work on this library. I used the original library a few years ago and remembered i had some problems with it so thought i'd incorporate some changes i had to make. Nothing major, but they caused me some problems under some circumstances (exactly what i can't remember, but i think i was getting notices raised when the library was trying to statically call methods that weren't static, and the typo in the method name might have done the same).