fixed php notices from custom js metabox.