template changed first when it's a ajax request