two birds with one stone fix #45 and fix #33