Attempt to fix bugs