fixes for GCC 4.7.1