Fixes for issue #224

These are the 2 fixes I suggested for issue #224