undo ugly hack