Added changes from so post.