Fixed Some Bugs