Fixing bugs