some fixes for base contorller class, fix #37