bug fixes as reported on forum