fixing bugs with controllers