fix some low level bugs