Added error catching (invalid axis)