Fix check if you're up to date in javascript