Bug fix: strrpos() returns 0 when no corresponding match is found