bug fix to control