Fixed the behaviour for static files when debug is False