fixing memory errors in parseEvent

Adding a check to see if a row has already been applied (accoriding to the last applied snapshot id)