fixed some initialization issues