Corrected the error in saving the details