Fixed issue with double execution of onchange event on input

This patch prevents the onchange function to be executed twice. 
Haven't tested any possible issues further, but this one works for my scenario :)