Fix order in which credentials are getting fetched