Seems the refresh has dissapeared inside a stupid if