fix for #12, added an error message if height/width is not set.