proper fix for issue 502