bug fix in loadbuffer