fix bug with nil responses