Fix more GCC 4.9 optimization errors

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>