Fix potential issue in Handler