Small improvements on asserts