fix input error and window size