Code from platform 4 (human msg not closing bug)