better fix for issue #21