Fixed Various Bugs