improve error specifications