fixed the mergeSpec() warning and did some cosmetics