corrections on some functions