May have fixed casting error messages.