Fixed error with multiple inputs