Fixing a bug with HD sprite generation