fixed RETVAL issue