fixed plugin implementation