fixed a bug with export canvas