Fix an issue with the getSubjects() API call. Not all the returned subjects where instances of the class Subject(). This was caused by the fact that the $subjects variable was used for two purposes.