fix division by zero in positionOfOnes
fix y-axis of OnionVisualizer