fix awful bug introduced by performance fix last patch