fix the contexttable action
fix other bugs/warnings