Here is Canvas object wihch demonstrate the problem.

If there were no nails, the top board would slide in the x direction.