Fix assertion logic

Change-Id: I5c91bcbc7560287107b4628f71977219835e41d7