Modified the definition of dx and dy in the new driver, to deal with the 1st issue mentioned in ticket #858.