Update main.js

possible fix to the player load bug