Fixed message model bugs