Fixed error conditions and comments.