Updated sprite logic.