Fixed some initialization issues