#98 fixed plugin lifecycle