fix reference fields, debug app and contact fields.