Fixed php errors when saving tracks