bug fixes; added preserve on refresh parameter