This function has already been added in bug 1007566