Fix potential problems with build system