Fixes the sprite manager + minor fixes