fixed some errors

RETVAL was not being set
success message was static to stable instead of using the variable