clean up hamlet and its related fix