fix for gcc version 4 and 5