Errors in functions that can be caused by the user's fault, are now addressed correctly by lua.