IM-629: backend pypo changes

-minor logic error fix