Fixing a NullPointerException.