Minor bugfixes

Bug in demo