fix some issues with controller and add BaseController