Minor changes to handle advertising