-fixed crash reported by n-pigeon