Added proper conditions to mod_restrict