fixing visualization error and other minor issues