Added changes from John May