fix type optionals