Added check to close resources when accidentally opened due to lag.