Complete fix for issue #248.