fix RESVAL error