Fixes to optionals and collections