Fixed some bugs..