fix bug that error occured while no handles set