Fixing invalid reference to Messages model