Bug fix for null Object