Fix bug in which an error would be triggered when in a production environment.