Fixing bug of handoff