Adds id only in ajax case