cherry picked angular fix, closes #32 and #33