Troubles with reflection.

Had some troubles with reflection, so I did some changes that I believe
will help further.
Merge pull request #4 from gabfr/master

Troubles with reflection.