fix stdin message handling & specs

fix for issue #1386