fixed bug in read_signal