fixed focus issue and graphics crash