Some lifecycle fixes