fixed the bug related to hardware acceleration