Fixed most loading bugs