accidentally removed some null checks