Throw in a couple of assert()s

Signed-off-by: Thorben Hasenpusch <thorben.hasenpusch@gmail.com>