Fixed wrong use of optional (should have been key)