Update MessageManager.java

Re-wrote it to work