Fix #509 and some other bugs.
Merge branch 'master' of github.com:FreezingMoon/AncientBeast