fix horrible variable declaration in demo