fix write lock bug by filling it first with data