Handle 0 for last and allow to define published using stage.