Fix bug, use WRef in argument parsing