fixes for inline templates