Fixed assert so that it does not bother when building in debug.