swag me out doe
fix error where val is undefined