Function to disable damage and fixed NullPointer