Update main.js

fixes regarding player load bug