Fixed a bug in authorization rules