Handles wrong elements and has error message.