Fix headers variable in wrong scope in get()