Fixed bug in toStdClass method that was not carrying over the actual data from the entity object but instead, the field names