fixing bugs for demo