fix invalid javascript issues
migrate: Fix getVersionNumbers function