Fixed bug when setting alive value