Fix some stupid mistakes

Mainly Nullref