fix performance & broken master template