(WIP)Fixed some bug.