fix a couple bugs

Signed-off-by: Pooria Azimi <pooriaazimi@me.com>