fixed for ticket #340