Fixed a bug related to cancan auth.