fix for callcost out of bounds merge (thanks DigiDaz)