Fix issue #249