fixed bool error in functions.lua