Fix $intercom variable scope