Fixed problem with URL rewrites