lots of super duper bug fixes