fix the refresh. There's still an issue here but it's better