Added empty buffer check !