Trying to use a template and it hangs