fix bug on refresh, fixes #63