Credentials are passing but getting seg faults