fix bug with opt dependencies