Added an extra assertion check