fixed wrong enemy density when resizing, refactored density updating