improved error via @EugeneAbrosimov