fix some bugs, but cancan bug haven't fix