fixed error when using different image sizes in sprites