Fixed errors in the asserted variables.

Some of the NSAssert instructions were querying the wrong variables. This caused exceptions even when the configuration was correct.