Added some missing but necessary functions.