Improve code for precompiled case