fixed printMsg errors