Corrected some errors when reading from WS