minor  bug fixes