Bug fix #40