fix grant sql