UF-39:  fixes based on jfuerth suggestion