merge multiple fixes from healthire/develop