fixing issue #120 and a warning in build