fixed bugs due to new message format