Fixed a Few bugs