Fix schoolboy error with optional values