clear snapshot before loading box and update box buffer after preparing valid layout