Fixing issue 145
Fixing issue 142