Fix error with null error