temporary fix to prevent negative costs (needs real fix later)