Fix api-key not being saved