fix via ticket see #808 and 08fb6cb