Where is jid coming from?  It seems like it would always be nil?