Fixed a null reference when testing levels