Finally fixed the build system