Changed the save functionality to allow pending