fixed bugs of input reference