fixed a highlighting bug on record update, also improved the table generation a bit