fix types of returned values