fixes transaction management for django<1.6