Fix bottom and top mask creation in base.
Temporary fix to nax_int value to avoid underflow.