Fixed Some Bugs.