fix key and layer configs should be optional