fix for FlxSprite's randomFrame() and for issue #397