Hughes commits to fixing flawed gun registry