fixed functions on buttons