fix a bug in autoplot function