fix external build
fix build to external dir