The first stage towards fixing issue #59.
Second and final stage for fixing issue #59.