Fixes issue 65
Fixes issue 59