Add select_related to problem query