Removed invalid cast