Backported facebook fix