hack to remove nullpointer exceptions