So the solutoin in this lecture solved the bug for me. However I thought it could be usefull for others if I explained how the bug actually showed up for me.
Everything seemd to work for me, however after finishing a level and starting on the next level the score stopped increasing. Oddly enough, when finishing the last level and starting a new game, in the first level the score continued where it was last time I finished that first level.
I then included a number of debug logs to print the total score to the console. This showed that for each level the score was reset and started counting again from zero, except for the first level.