fixed bug due to Integer instead of int