bug fixes for GCC 4.8