auto closing resources and play stop