Fix bug in TopsPlugin