Add events and fix posts bug