detect inline dirs correctly
