Add some dependencies and fix some problems on startup.