more fix on static build