Bug fix for Refresh

See code for description