fix parent autodetect