bug while putting bytes into bytebuffer