Fix custom api key bug