Bug fix of for firefox on negative drawing index on canvas