Fix broken loop in grant()