bug fix for 1007