fix selecting backend based on priority