Fix for issue #324