fix to possible bug in UBO demo