Fixed an issue occuring on refresh