Bugfix for modern django