fixed minor bugs from inv cleanup