fix for null pointer exception in host