Fixed bug with ATI cards