change post_compile to pre_compile