fixed msg parsing when reading data in from user