fixing buffer loading