bugfix: call refresh function when refreshing