Fixed error in calculation current_user's relationship to an entity on the frontend. Fixes #149.