Fixing template deprecation