Changed the rewrite condition