fixes to properly handle null