[BUG #7866] Fixed issue with immediate mode that after the first run the callback was never executed.