Added missing session commit() to task