fix longstanding dot bug for axis != -1