Fixed bug in TMS reader.