fixed #26, fixed unexpected output