clean + fix a bug