fixed issues when loading into new shell