Fixed some Bugs