eliminated warning
corrected assert
improved error message