Buffer issue in terms of out of bounds