Moved order around to make sure local stuff is executed during interactive shells appropriately.