Try implementing this on a vanilla ROM. If the issue isn't there, then it's a problem with the base you're using. (Perhaps a changed offset or routine?) Either way, not really something I can solve.
If the issue persists, then PM me, and I'll try and pin down the issue with you. Because the...