Fixed positioning bug when sprite image is changed.