Beam motions near separatrix