Fixed typo, added testing - previous corner case now cleanly prevented