Fixed problems with spurious input