Added bug fixes for index and show