fixed double execution of commitSession