Set type in the update function. fixes dynamic URL bug