Performance fix for #204