fix error with DEBUG=False