bugfix (reference error in Firefox) when using drawing tool