Fixed bug in life logic