Fixed typo in code designed to make things more robust