Fixing 'null' code behaviour