more cleanup and less errors