fixed some bugs :)