correct cast in macro definition