Tidied up after adding checks