Fixed failures in django1.7