Trying to fix functions working with -O2 compilation (it's still broken).