Fixed a bug in referencing inputs by name