Fix "No entities found" error

Fixes:

https://github.com/voormedia/rails-erd/issues/45
https://github.com/voormedia/rails-erd/issues/42

thanks to espinosa to find the error.

Not sure if this breakes other things though.