fix found macro bugs