fixed g++4.4 compilation
fixed assertion