added if for baking with no keys.