Fixed some issues with optionals.