Fixing a null pointer crash.