correctly terminate fhem command