Fixed handling for empty positions.
Updated logging.