some cleanings and more checks