set NULL when buffer created