fix deprecated warnings in template