Moved li outside if block + doc update.