Update fx.js

Fix a bug in which we could not chain animations.