Fixes fatal error on sales logs, also, prefixed new functions.