Fixed errors with uninitialized values.