fixed a bug concerning issue #107