bugfix : ensure we have some data before trying to access the previous byte