Bug fix #348, #652