Fixed non-ending block in template