Original: Anastasia stuck her tongue out at Yakov Yurovsky, the head of the detachment, when he momentarily turned his back and left the room.
Simplified: Anastasia even stuck her tongue out at Yakov Yurovsky, the head of the guards, when he turned his back and left the room.