JS fix for messages