second attempt at fixing issue #25