Fix Github issue #166