Fixed some bugs so that some commands wouldn't work