corrected some test of is_allowed