Fix some Bugs