Urgent fix.

Prevents a ```NullPointerException``` happening once in a while.