fixed autorun

better solution