fix bug about permission