fixes issue where multiple requires causes multiple writes