Fix on checkchanges function