Corrected invalid cast due to swapped arguments.