Added more message handling