cap and precompile fix