Cleaning up bugs