Fixes helper function