fix grant bug