Fix bugs, edit functions #5321ds