FIXED #46, and fixed bug in BaseController