fixed some unnecessary code at figure and add some missing code in
control class