Fix some tag functions, better display of module errors