fixed mask bug