Changed all blocks to breaks and removed duplicate session ID