Fix a bug in tweening