fix crash bug from unedited bitmap input - need to revisit this.