fixed some bugs :D