Fixed issue ending command with EOF.