Fixing all the bugs