Modified program to work with GCC 4.6