Avoid sprite first frame glitch