fix bug with bad input

also, remove a debugging command