fixing a few wee bugs