Fix a couple NPEs that was bound to happen