Fix cookie capturing

Cookie capturing didn't work for me and this fixes it.