Merges #629.