Fixed SOme Bugs