Fixed some bugs...