fixed issue with html being undefined