Type casting to int on dir mask