Fixed compiler errors on gcc-4.8.2