many fixes, hopefully nothing new broke