Fix strange bug with allow method