Bug fixes in show function