Added flashes, fixed error on index