bug fixes and improvements

don't know what ... who carres at this stage ?