Fixed a compatibility bug which it doesn't work in firefox, still there
is a bug in IE version about cleaning the shape.