Added cast to suppress compiler warnings