fix bugs but cancan is not work correctly