Merging bugfix. Thanks Jeff Blaine