fix case to dirname used