analyzer: fix few bugs