bug fix in controlers