database locked fix