fix prepublish detection