fix plugin, simplify code