fixes issue 228
fixes issue 218
Merge pull request #237 from niphlod/issue/228

fixes issue 228
Merge pull request #238 from niphlod/issue/218

fixes issue 218