NPE fix introduced another issue, this fixes both