Fixed import issue when debug set to False