Fixed another crash bug (message vector) and misc. changes