Modify "return" in some functions