update for compatibility with 1.8, latest source