Fixed bug when plugin was not working properly with permalinks style set to "Default".