Fixed nil cases

This is why we need fucking testing god dammit.