fix #1178 - error when the user doesn't belong to a project

this is the simplest solution but I think we should refactor all this