It looks like it runs fine, however, there might be other code affecting it, Try isolating the code and finding anything else that could be messing with it.