Added error handling to stats selection.