Fix masks to work properly with negative values