fix for issue #283

(cherry picked from commit b8cde2f321d2929be336357922042e31b9f5348b)