Add casting back in, as toString caused crashing to occur in some cases