Changed autoReleaseAfterClose to true