MacOS compatibility
Fixed db actions problem