fixed a bug with autorun