minor fixes

use builtin popcount, fix broken nbproject