attempt to fix a reflection bug

I'm not sure whether this is the absolute fix as I just tried to understand why my code wouldn't work properly, and didn't want to spend the rest of the night reading the doc on the reflection package... :)