fix category axis scale function