fixed unnecessary dependency loading and added migration