Fixed empty tags and minor changes in error messages