fix some timing bugs. untested at this point
clean up rogue quote that screws it all up