fix code to work properly with 14.6 drivers