fix object printing in debug mode