clean up some stuff for validation