Fix javascript error for message nuggets