Fixed bug in clean()