[#285] Re add function mis-used in api controller