fix to always send '\n' at the end of command