Fix entities in client code.

Fix #30

Don't merge yet, I'm going to add a test as soon as I figure out where to add it.