Fixed #391: fixed int conversion