fix basename stuff