Fixed an index error and modiefied views for details pages