Removed the broken assert (that'll teach me for coding first thing in the morning), and added object boxing instead.