Fixed db & permissions issue