Fixed error read for shell mode