added a little more error checking to tender controller