Further compiler warning fixes

Alex, please check - this also resolves issue #145