Added casting to int when passing expression as parameter