Fixed some bugs....