added ng-controller to modal, minor bug fixed