Changed status check to see if staus was NOT running instead of pending before trying to associate the elastic IP.