Wrong order on push function was causing memory to overstep bounds.