Empty buffer check should be made against the right buffer.