TOM: bugs with GUI and plotting fixed