Corrected assert function