fixed some bugs, chasing more =)