Slight modification to axis.js