fix input reading when args are provided