Fixed the input id lookup problem (in several places)