Fix error on getOrganizations function