ability system, fix some bugs