Fix for issue #308