Added type-casting to avoid warning from the compiler