Fix nil exception.