Fixed the onchange events for controls