fixed most junit tests