fixed a input sanity bug