Added an internal method for wait_for_loaded and use a public method wrapper.
Update active interfaces in the db when loading local interfaces.