Nonlocal problems at nearly critical growth