Make grants work with the new API