fix real-time formatting problem