Remove wrong usage of assert() causing code lost in release mode