Extra grant should be added before return in function grant()