Fixed memory leak in loading sprites.