Fix issue #6

corrected overflow issue for bios