fix for issue #285

fixes for Issue 285 that I entered.
Robert