Finally, fixing the input issiues