Fixes two lifecycle bugs in the okwc hierarchy