fix relation does not exist error (fixes #10)