fixed issue effecting latest angular beta + perf improvements