Fixed the routine that broke with the hero table changes