remove config before device

This will help debug why there are devices referencing a config
that does not exist