Fixed a Few Bugs