more bug fixes for finding patients