Fixes to chrome closing functionality