Fixed bug from calling old function