Fixed bug in prefix option

Sorry. There was an bug in my previous pull request. This should fix it.