fix backwards empty relation check logic