fixed up basename