Made some changes to make debugging lib loading crashes easier.