fixed functions.lua line 613