I know it seems counter intuitive, but did you try putting delay() functions by the serial commands.
I been working on a DuinOS project all weekend. The serial.print functions gave me allot of trouble, but for some reason if I put delays right after or before the serial commands the trouble went away.
I wondering if it caused by the Content switching and interrupting the serial functions.