Fixed a problem in the change function. It was trying to parse as JSON a undefined value