adding fixes for linux compilation on template examples