fixes some edge cases (macros f.e)