Fixed version counts when activating and deleting versions

Signed-off-by: Tom Wright <tom@inflatablecookie.com>