fixed kai's bugs!