fixing ratio textbox bug