Fixed double array push and removed debug code