Applying same changes as pullrequest #19 to idrop3 branch