Fix #249 & #275