Move transaction commit in one block level to fix syntax error.