critical bug fix for real mode code