Bugs Fixed

Some bugs fixed