fixed inputmismatch errors