fix per sprites
(cherry picked from commit 7e6b63e)