little fix for compatibility with django1.5