Index: sources/app/src/main/java/parkup/services/AdministratorService.java
===================================================================
--- sources/app/src/main/java/parkup/services/AdministratorService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/services/AdministratorService.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -5,4 +5,5 @@
 import java.util.Optional;
 import java.util.UUID;
+import java.util.stream.Collectors;
 import javax.transaction.Transactional;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -59,10 +60,10 @@
         if (administratorOpt.isPresent()) {
             Administrator administratorNov = this.administratorRepository.findByAdministratorId(administratorId);
-            if (email != null && email.length() > 1 && email.contains("@") && !Objects.equals(administratorNov.getEmail(), email)) {
-                Optional<Administrator> userOpt1 = this.administratorRepository.findAdministratorByEmail(email);
-                if (userOpt1.isPresent()) {
-                    throw new IllegalStateException("email taken");
-                }
-                administratorNov.setEmail(email);
+            if (email != null && email.length() > 1 && email.contains("@")) {
+                List<String> emails = administratorRepository.findAll().stream().map(Administrator::getEmail).collect(Collectors.toList());
+                for(String mailToCheck :emails)
+                    if (email.equals(mailToCheck) && administratorNov.getAdministratorId()!=administratorId) {
+                        throw new IllegalStateException("email taken");
+                    }
             }else{
                 throw new IllegalStateException("email not valid");
Index: sources/app/src/main/java/parkup/services/ParkingSessionService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingSessionService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/services/ParkingSessionService.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -49,23 +49,4 @@
     }
 
-   /* @Transactional
-    public void updateParkingSession(int parkingSessionId, String timeStart, String timeEnd, Tablicka tablicka) {
-        Optional<ParkingSession> parkingSessionOpt = Optional.ofNullable(parkingSessionRepository.findByPssId(parkingSessionId));
-        if (parkingSessionOpt.isPresent()) {
-            ParkingSession parkingSessionNov = parkingSessionRepository.findByPssId(parkingSessionId);
-
-            if(!parkingSessionNov.getTimeStart().equals(timeStart) && !parkingSessionNov.getTimeStart().equals(timeEnd))
-                parkingSessionNov.setTimeStart(timeStart);
-
-            if(!parkingSessionNov.getTimeEnd().equals(timeEnd) && !parkingSessionNov.getTimeEnd().equals(timeStart))
-                parkingSessionNov.setTimeEnd(timeEnd);
-
-            if(tablicka!=null && !Objects.equals(parkingSessionNov.getTablica(),tablicka)){
-                parkingSessionNov.setTablica(tablicka);
-            }
-        }else{
-            throw new IllegalStateException("The ParkingSession does not exist");
-        }
-    }*/
     @Transactional
     public Optional<ParkingSession> deleteParkingSession(int parkingSessionId) {
@@ -156,5 +137,5 @@
         String expYearString=date.split("/")[1];
         if(expMonthString.startsWith("0"))
-            expMonthString=expYearString.substring(1);
+            expMonthString=expMonthString.substring(1);
         if(expYearString.startsWith("0"))
             expYearString=expYearString.substring(1);
Index: sources/app/src/main/java/parkup/services/ParkingZoneService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingZoneService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/services/ParkingZoneService.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -91,5 +91,5 @@
 
         //TODO prati niza od objekti ParkingSpaces i prati objekt ParkingZoneLocation
-
+        ParkingZone parkingZone = parkingZoneRepository.findByPzId(parkingZoneId);
             ParkingZone parkingZoneNov = parkingZoneRepository.findByPzId(parkingZoneId);
             if (parkingZoneNov!=null) {
@@ -132,7 +132,12 @@
                         parkingZoneNov.getParkingSpaces().add(ps);
                     }
+                }else{
+                    parkingZoneNov.setParkingSpaces(null);
                 }
                 if (!responsibleWorkers.isEmpty()) {
-                    ParkingZone parkingZone = parkingZoneRepository.findByPzId(parkingZoneId);
+
+                    for(Integer workerId: getResponsibleWorkers(parkingZoneId).stream().map(WorkerDemo::getWorkerId).collect(Collectors.toList())){
+                        workerRepository.findByWorkerId(workerId).getParkingZones().remove(parkingZone);
+                    }
                     for (Integer workerId : responsibleWorkers.stream().map(WorkerDemo::getWorkerId).collect(Collectors.toList())) {
                         Worker workerToAdd = workerRepository.findByWorkerId(workerId);
@@ -140,4 +145,6 @@
                         workerToAdd.getParkingZones().add(parkingZone);
                     }
+                }else{
+                    workerRepository.findAll().stream().filter(w->w.getParkingZones().contains(parkingZone)).forEach(w->w.getParkingZones().remove(parkingZone));
                 }
 
@@ -156,4 +163,5 @@
                 parkingZoneOpt.get().setParkingSpaces(null);
                 parkingZoneOpt.get().setParkingZoneLocation(null);
+                workerRepository.findAll().stream().filter(w->w.getParkingZones().contains(parkingZoneOpt.get())).forEach(w->w.getParkingZones().remove(parkingZoneOpt.get()));
                 parkingZoneRepository.deleteByPzId(parkingZoneId);
             } else {
Index: sources/app/src/main/java/parkup/services/WorkerService.java
===================================================================
--- sources/app/src/main/java/parkup/services/WorkerService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/services/WorkerService.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -31,12 +31,11 @@
     }
 
-    public List<WorkerDemo> getWorkers() {
-        return this.workerRepository.findAll().stream().map(WorkerDemo::new).collect(Collectors.toList());
+    public List<Worker> getWorkers() {
+        return this.workerRepository.findAll();
     }
 
     public WorkerDemoParkingZones findById(int workerId) {
         Worker worker = this.workerRepository.findByWorkerId(workerId);
-        WorkerDemoParkingZones workerToReturn = new WorkerDemoParkingZones(worker);
-        return workerToReturn;
+        return new WorkerDemoParkingZones(worker);
     }
 
@@ -103,5 +102,4 @@
         Optional<Worker> workerOpt = Optional.ofNullable(this.workerRepository.findByWorkerId(workerId));
         if (workerOpt.isPresent()) {
-
             if (email != null && email.length() > 1 && email.contains("@") ) {
                 List<String> emails = workerRepository.findAll().stream().map(Worker::getEmail).collect(Collectors.toList());
@@ -117,5 +115,5 @@
                 workerOpt.get().setPassword(bCryptPasswordEncoder.encode(password));
             }
-            workerOpt.get().setLocked(locked);
+            workerOpt.get().setAccount(locked);
 
             if (firstName != null && firstName.length() > 1 && !Objects.equals(workerOpt.get().getFirstName(), firstName)) {
