Saving the ArrayBuffer in the right place