fix handle bug