Fix nullable state code not working.