up #369: cleanup and fix compilation