Got this to actually work in debug mode, so removing console logging.