Fix issue for #258
Fix issue for #259