Additional checks in controller and script
Fixed dependencypass error