Bug fix #166