fixed the function modes list
Made the pop(0) valid by removing useless and broken check.