Fixing obvious bugs