Fixing draw bug for firefox