Fix entityMetadata reads

Seems to have been broken at some point. This pull request fixes it.