Code Working Except for 4-bit Mode