fixed kwargs and invalidation bug