fixed a bug which occurred when there is only one input widget