Fixing clear bug