fixed select patient error