now throws errors correctly