Thanks for the support! I've managed to 'fix' it. Reinstalled the IDF with predownloaded V4.0.3 version.
I couldn't get the uint conversion working in the main.c. It came up with a lot of errors. So I decided to go for the quick and dirty solution; hardcoded sleep timer of four hours in microseconds. Not the way it supposed to be, but it works for me ;-)