fixed junit tests and others