fixed directive controller problem