Fixed ClassCastException when returning stored numerical fields.

Hi there,

here's a (likely) fix for the the issue I submitted.