fixed bug wehn run on computers with accelerated graphics