may have fixed tahg's NPE in the end.