Fixed multiple Bugs