F: fix performance issues