Fixed logic in generation of 'objekt' table. Made sure everything was committed at the end.