Fixed url params retain and added tests