Fixed primitive field cast

+ added primitive handling for fields (similar to setters)

* modified test files accordingly