couple of fixes to test for initialised variable