Fix assert error for invalid address