Reflection fixes

Closes #348.