Adds missing return in terminal-func