Modifications to work in Facebook env.