fixed small issue in autodetector
fixed small issue in generator