fixed drawing issues on firefox