Fixed bugs (misuse of inputname function, as in commit #4ce2c3644af333733d802383559de8c0340213bd).