Fixed javascript/php error on save.