Fix some misc issues about S4 class and plotting