Fixed the done functions to return the value correctly.