fix the cleanviewed method so it works properly