Fix rastriging function.