Fix remaining dependencies for optional types