fixing allocation of the controls