Fixed core dump in gcc4.8