fixed some bugs with controller wrapper