Fixed error with adaptation