Fixing replace query test