optimize and fix player