Fixed the retrieval of agents on an app id