Fix ticket#246