Fix for null pointer