fixing optionals types