tweaking and fixing a couple of minor issues