Fix for basename

You don't have to merge this one, just wanted to show you what I did to fix it.