fixed a bug where x-axis would not resize correctly