Mask and command line fixes