fix empty fields bug + print backtrace for errors