fix invalid input + fix view