Fixed bug with AMD drivers and optimised