Fix errors introduced by macro refactor