bugfix for clearing