Added type cast to silence compiler warning