messages controller (index) corrected