Fixed some bugs

BOOM.