Merged: fixing issue #40