Fixed up JSON middleware but confused by empty GIF