added some gems for better errors