Fix malformed keys when using fog with endpoint