Fixing more bugs