Fixed all functions.