Changed mask to uint32_t