fix bug messages index