I have currently both bugs in my engine (5.0.3), because I´ve just moved it from 4.25 to 5.0…
To fix those bugs forever, you need to create new variables and replace the old ones ^^
But there´s a simple way to fix those errors:
(German video)
Maybe it fixes them also, when you migrate your current project into a new projects ^^