CentOS build: some bugfixes as well as improvements