Created a method to check if all statements are still running.