fixing Bugs