tried to fix runtime errors but now demo doesn't dislay anything