Fixed reset and small clean up