Fixing memory issue and password setting which doesn't help