small bugs with Optional<T> fixed