Added setEnded to override default behaviours