Fixed htmlentities bug