Added OPT_STATIC flag for optimization