fixed controller code snippet in the index