Find number of non-singular matrices 
If $w$ is complex cube root of unity $w \ne 1$ then find number of non-singular matrices of the form
  $$A=\begin{bmatrix}
1 & a & b\\ 
 w&1  &c \\ 
w^2 &w  & 1
\end{bmatrix}$$ such that $a,b,c$ takes values from the set $S=\left\{w,w^2\right\}$

My Try:
we have $$\det(A)=acw^2-(a+c)w+1$$.
$\det(A)=0$ only if $ac=1$ and $a+c=-1$ since $1+w+w^2=0$.
So $a=w $ ad $c=w^2$ OR $a=w^2$ and $c=w$.
But since $\det(A)$ is independent of $b$ The final possible triplets $(a,b,c)$ are
$1.$ $(w,w^2,w^2)$
$2.$ $(w^2,w,w)$
$3.$ $(w,w,w^2)$
$4.$ $(w^2,w^2,w)$
So total number of singular matrices is $4$.
But total number of matrices $A$ is $8$.
Hence total number of non-singular matrices is $8-4=4$.
But my book answer is $2$. May I know where is the mistake?

The matrix $A$ is singular iff
$$0=\frac{\det(A)}{w^2}=\frac{1}{w^2}-(a+c)\frac{1}{w}+ac=
\left(\frac{1}{w}-a\right)\left(\frac{1}{w}-c\right)$$
that is iff $a=1/w=w^2$ and $c\in S$ or $c=1/w=w^2$ and $a\in S$. So there are two more cases: $(w^2,w^2,w^2)$ and $(w^2,w,w^2)$. 
Hence the total number of non-singular matrices is $2^3-(4+2)=2$.
