Fixed program loading and name resolution