remove invalid basename calls